package com.wing.purchase.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.purchase.model.entity.PurchaseSignFor;
import com.wing.purchase.model.response.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 采购签收-Dao
 *
 * @author
 */
@Mapper
public interface PurchaseSignForDao extends BaseMapper<PurchaseSignFor> {

    /**
     * 列表-app
     *
     * @param params
     * @return
     */
    List<PurchaseSignForVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     * @return
     */
    List<PurchaseSignForVO> list4app(@Param("page") Page<PurchaseSignForVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     * @return
     */
    PurchaseSignForVO get4appById(Long id);

    /**
     * 查询入库签收单
     *
     * @param signNo
     * @return
     */
    PurchaseSignForVO getDeliverySignInfo(String signNo);

    /**
     * 查询签收单产品信息和签收的条码总数
     *
     * @param signProductDetailId
     * @return
     */
    InventoryJobLabelVO getSignPackLabelNum(Long signProductDetailId);

    /**
     * 查询采购入库类型的数据
     *
     * @param operateType
     * @param inventoryType
     */
    List<WarehouseInventoryTypeVO> queryWarehouseInventoryType(@Param("operateType") Integer operateType, @Param("inventoryType") Integer inventoryType);

    /**
     * 查询料箱数据
     *
     * @param code
     * @param warehouseId
     * @return
     */
    PalletBoxListVO getPalletBox(@Param("code") String code, @Param("warehouseId") Long warehouseId);

    /**
     * 采购入库作业/扫描包装条码
     *
     * @param signId
     * @param code
     * @param inoutType
     * @param signProductDetailId
     * @return
     */
    PurchaseSignForProductLabelVO getSignPackLabel(@Param("signId") Long signId, @Param("code") String code
            , @Param("inoutType") Integer inoutType, @Param("signProductDetailId") Long signProductDetailId);

    /**
     * 查询库位数据
     *
     * @param code
     * @param warehouseId
     * @return
     */
    WarehouseShelfSpaceVO getShelfSpace(@Param("code") String code, @Param("warehouseId") Long warehouseId);

    /**
     * 生产入库-报工单列表
     *
     * @return
     */
    List<ProductionTheWorkOrderVO> productionWorkOrderList(@Param("params") Map<String, Object> params);


    /**
     * 查询入库计划相关
     * @return
     */
    List<ProductionTheWorkOrderVO> getProductionInfo(@Param("id") Long id);


}
